#ifndef __HEROZ_HH___
#define __HEROZ_HH___
#include "heroz_font.hh"
#include "heroz_graphics.hh"
#include "heroz_screens.hh"
#include "heroz_basic.hh"
#include "heroz_sound.hh"
#include "heroz_input.hh"

#define GM_SS_Basic 0x4000000L
#define GM_SS_Level 0x4100000L

#define GM_GE_CodeFlow 0x00100000L

struct HeroZ {
  std::vector<ScreenCharacters> screens;
  SDL_Surface *display;
  HFont *font;
  HerozGraphics *gfx;
  HeroBasic *basic;
  short infopos;
  unsigned char *memory;
  ScreenCharacters *screen;
  std::vector<Mix_Music *> muzaks;
  Input *input;
  float px, py, pdx, pdy; //player x, y, delta x, deltay
  Levels *levels;
  Uint32 last_ticks;
  float mvmr; //!< movement rate in s
  SDL_Thread *display_thread;
  SDL_Surface *screen_buffer;
  int quit; //!< general signal for all threads, etc. to quit if set
	    //to anything else than zero.
  uint32_t displayed_frame_number;
  ScreenCharacters *txtscreen; //!< This is an overlay using the text
			       //!font. Space is *always* transparent.
  const char *datapath;
};

void play_the_game(HeroZ *heroz);
HeroZ *init_engine(const char *path);
void init_threads(HeroZ *heroz);
void clean_up(HeroZ *heroz);

#endif
